package com.orange.delivery.presentation.common;

import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.request.resource.PackageResourceReference;

import com.orange.delivery.presentation.page.HomePage;

/**
 * Template for application pages with header and footer
 */
public abstract class HeaderFooterTemplatePage extends ApplicationTemplatePage {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * The header panel
	 */
	protected HeaderPanel headerPanel;

	/**
	 * The header panel for tabs
	 */
	protected HeaderTabPanel headerTabPanel;

	/**
	 * The footer panel
	 */
	protected FooterPanel footerPanel;

	public HeaderFooterTemplatePage() {
		headerPanel = new HeaderPanel("header");
		headerTabPanel = new HeaderTabPanel("headerTab");
		footerPanel = new FooterPanel("footer");
		BookmarkablePageLink<Void> homePageLink = new BookmarkablePageLink<Void>("index", HomePage.class);
		homePageLink.add(new Image("logo_orange", new PackageResourceReference("orange_logo.jpg")));
		add(homePageLink);
		add(headerPanel);
		add(headerTabPanel);
		add(footerPanel);
	}
}
